<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>{% block title %}{% endblock %}</title>
    {% load staticfiles %}
    <meta name="keywords" content="{% block keywords %}{% endblock %}"/>
    <meta name="description"
          content="{% block description %}本网站是本人个人网站，用来记录个人博客，网络记事本，及兴趣收集。其中部分来自网络，如有侵权，留言告知，本站将重点放在技术分析上，欢迎大家友好骚扰。{% endblock %}"/>
    <link rel="stylesheet" href="{% static "css/personal_website/css.css" %}" type="text/css"/>
    <link rel="stylesheet" href="{% static "css/zzsc.css" %}" type="text/css"/>
    <link rel="stylesheet" href="{% static "assets/css/amazeui.css" %}" type="text/css"/>
    <script type="text/javascript" src="{% static "js/jquery-1.10.2.min.js" %}"></script>
    <script type="text/javascript" src="{% static "assets/js/amazeui.min.js" %}"></script>
    <script type="text/javascript" src="{% static "js/go_top.js" %}"></script>
    {% block head_link_script %}{% endblock %}
</head>
<body>

<!--头部-->
<!--头部开始-->
<!--导航代码 -->
{% block header %}
    <header class="am-topbar am-topbar-inverse am-topbar-fixed-top">
        <div class="main">
            <h1 class="am-topbar-brand">
                <a href="#" class="am-active">江流天地外</a>
            </h1>
            <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only"
                    data-am-collapse="{target: '#doc-topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span
                    class="am-icon-bars"></span></button>
            <div class="am-collapse am-topbar-collapse" id="doc-topbar-collapse">
                <ul class="am-nav am-nav-pills am-topbar-nav">
                    {% for n in navigation %}
                        {% if n.child == None %}
                            <li {% if n.active == True %}class="am-active"{% endif %}><a
                                    href="{{ n.url }}">{{ n.name }}</a>
                            </li>
                        {% else %}
                            <li class="am-dropdown" data-am-dropdown>
                                <a class="am-dropdown-toggle" data-am-dropdown-toggle href="javascript:;">
                                    {{ n.name }} <span class="am-icon-caret-down"></span>
                                </a>
                                <ul class="am-dropdown-content">
                                    {% for c in n.child %}
                                        <li><a href="{{ c.url }}">{{ c.name }}</a></li>
                                    {% endfor %}
                                </ul>
                            </li>
                        {% endif %}
                    {% endfor %}
                </ul>

                <!-- 导航中的表单，可用于搜索 -->
                <form class="am-topbar-form am-topbar-left am-form-inline" role="search">
                    <div class="am-form-group">
                        <input type="text" class="am-form-field am-input-sm" placeholder="搜索文章">
                    </div>
                    <button type="submit" class="am-btn  am-btn-primary am-btn-sm">搜索</button>
                </form>

                {% if user.is_authenticated %}
                    <div class="am-topbar-right">
                        <div class="am-dropdown am-topbar-form " data-am-dropdown="{boundary: '.am-topbar'}">
                            <img alt="{{ user.username }}" src="{{ user.userprofile.avatar.url }}"
                                 class="am-icon-btn-sm">
                        <span style="cursor:pointer;" class="am-dropdown-toggle" data-am-dropdown-toggle>
                            {{ user.username }}
                            <span class="am-icon-caret-down"></span>
                        </span>
                            <ul class="am-dropdown-content">
                                <li><a href="/admin"><span class="am-icon-cog"></span> 后台管理</a></li>
                                <li><a href="/logout"><span class="am-icon-power-off"> 退出</a></li>
                            </ul>
                        </div>
                    </div>
                {% else %}
                    <div class="am-topbar-right">
                        <button class="am-btn am-btn-primary am-topbar-btn am-btn-sm" onclick="login()">登录</button>
                    </div>
                {% endif %}
            </div>
        </div>
    </header>
{% endblock %}

<div id="main_bg">
    <div id="main">
        {% block content %}
        {% endblock %}
    </div>
</div>
<!-- 页脚开始 -->
{% block footer %}
    <div class="footer-wrapper">
        <div class="footer">
            <ul>
                <li class="lp">
                    <h4>关注微信</h4>

                    <div>
                        <a href="http://m.jygawx.com/" target="_blank"><img
                                src="{% static "images/qrcode.jpg" %}" width="85"
                                height="85"/></a>
                    </div>
                </li>

                <li class="lx">
                    <h4>联系我</h4>

                    <div>
                        <a href="http://wpa.qq.com/msgrd?v=3&uin=420430604&site=qq&menu=yes" target="_blank"
                           title="QQ交谈"
                           rel="nofollow">QQ：420430604 </a><br>
                        <a href="mailto:420430604@qq.com" target="_blank">Email：420430604@qq.com</a><br>
                        <a href="#" target="_blank">留言板</a><br>
                    </div>
                </li>
            </ul>
            <p class="infobm"><span class="copyright">&copy;</span>2016 江流天地外 保留所有权利 鄂ICP备xxxx号-2.
                {% comment %}<script src="http://s11.cnzz.com/stat.php?id=1255184721&web_id=1255184721" language="JavaScript"></script>{% endcomment %}
            </p>
        </div>
    </div>
    <!-- 页脚结束 -->
{% endblock %}

{% block goto %}
    <!-- goto -->
    <div class="go-top dn" id="go-top">
        <a href="javascript:;" class="uc-2vm"></a>

        <div class="uc-2vm-pop dn">
            <h2 class="title-2wm">用微信扫一扫</h2>

            <div class="logo-2wm-box">
                <img src="{% static "images/qrcode.jpg" %}" alt="我的微信" width="240" height="240">
            </div>
        </div>
        <a href="#" target="_blank" class="feedback"></a>
        <a href="javascript:;" class="go"></a>
    </div>
{% endblock %}

<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="{% static "assets/js/amazeui.ie8polyfill.min.js" %}"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="{% static "assets/js/jquery.min.js" %}"></script>
<!--<![endif]-->
<script src="{% static "assets/js/amazeui.min.js" %}"></script>
<script src="{% static "assets/js/app.js" %}"></script>

</body>

</html>
